# -*- encoding:utf-8 -*-
from .base_model import BaseModel

class Role(BaseModel):
    cols = {"name": {"name": "角色", "type": "string"}, "menu_ids": {"name": "菜单JSON", "type": "string"}}
    model_name = "角色"


    def find(self, id):
        role = BaseModel.find(self, id)
        if role and role['menu_ids']:
            role['menu_id_list'] = role['menu_ids'].split(',')
        return role
